// Copyright 2019 orivil.com. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found at https://mit-license.org.

package main

import (
	"fmt"
	"regexp"
	"strings"
)

var str = `
    var author_img = "http://quce.cdn.woquhudong.cn/Vue/Index/image/user.png";
    var answer_img = "" ? ('http://uploads-user.cdn.woquhudong.cn/'+"") :"http://quce.cdn.woquhudong.cn/Vue/Index/image/answer.png?imageView2/1/w/200/h/200";
    var select_img = "http://quce.cdn.woquhudong.cn/Vue/Index/image/answer/select.png";
    var unselect_img = "http://quce.cdn.woquhudong.cn/Vue/Index/image/answer/unselect.png";

    var audio_pause_icon = "http://quce.cdn.woquhudong.cn/Vue/Index/image/answer/pause.png";
    var audio_play_icon = "http://quce.cdn.woquhudong.cn/Vue/Index/image/answer/play.gif";

    //特殊结果图
    var special = {
        result_image:'',
        draw_config:'{"y":"13","align":"center"}',
        status:'1',
        headimg_config:'{"x":"88","y":"137","width":"110","height":"110"}',
        image_config:'',
    };
    var res_admin = "http://uploads-admin.cdn.woquhudong.cn/";
    var homeUrl = "/index.php/wetest/index/index";
    
    var host = "/index.php/wetest/entry/index/";
    var resultUrl = "/index.php/wetest/entry/getresult";
    var getnameimageUrl = "/index.php/wetest/entry/getnameimage";
    var namepath_more = "/index.php/wetest/entry/getimagepath/name/";

    //长按保存结果
    var longTapUrl = "/index.php/wetest/entry/inclongtap";
    //结果回馈
    var resultTjUrl = "/index.php/wetest/entry/incgetresult";
    var acid = 0?'0':0;

    //测试进度统计
    var progressUrl = "/index.php/wetest/statics/playprogress";
    var recordProgress = "1";

    var sourceId = "401";
    var uuid = '595d6ab457e210c6';

    var gameData = {"id":"7194","title":"\u4f60\u662f\u4e2a\u611f\u60c5\u5e9f\u7269\u5417\uff1f","logo":"quce\/1566872602Z9GDc.jpg","desc":"\u611f\u60c5\u5e9f\u7269\u901a\u5e38\u7528\u6765\u5f62\u5bb9\u73b0\u4ee3\u4eba\u4e2d\u90a3\u4e9b\u201c\u4e0d\u8c08\u611f\u60c5\uff0c\u5565\u4e8b\u6ca1\u6709\uff1b\u4e00\u8c08\u611f\u60c5\uff0c\u751f\u6d3b\u4e71\u5957\u201d\u7684\u4eba\uff0c\u90a3\u4e48\u4f60\u662f\u4e00\u4e2a\u611f\u60c5\u5e9f\u7269\u5417\uff1f\u4f60\u7684\u611f\u60c5\u5e9f\u7269\u6307\u6570\u6709\u591a\u9ad8\u5462\uff1f\u5feb\u6765\u6d4b\u4e00\u6d4b\u5427\uff01","question":"[{\"img\":\"\",\"question\":\"\u4f60\u8c08\u8fc7\u51e0\u6b21\u604b\u7231\uff1f\",\"audio\":\"\",\"answer\":{\"a\":{\"title\":\"0~1\u6b21\",\"weight\":\"5\",\"img\":\"\"},\"b\":{\"title\":\"2-3\u6b21\",\"weight\":\"3\",\"img\":\"\"},\"c\":{\"title\":\"3\u6b21\u4ee5\u4e0a\",\"weight\":\"1\",\"img\":\"\"}},\"weight\":\"1\",\"merge\":false},{\"img\":\"\",\"question\":\"\u5047\u5982\u8857\u5934\u6709\u964c\u751f\u4eba\u8ddf\u4f60\u642d\u8baa\uff0c\u4f60\u4f1a\uff1a\",\"audio\":\"\",\"answer\":{\"a\":{\"title\":\"\u5e76\u4e0d\u60f3\u642d\u7406\",\"weight\":\"5\",\"img\":\"\"},\"b\":{\"title\":\"\u793c\u8c8c\u6027\u6577\u884d\u4e24\u53e5\",\"weight\":\"1\",\"img\":\"\"},\"c\":{\"title\":\"\u770b\u4eba\u51b3\u5b9a\u8981\u4e0d\u8981\u63a5\u8bdd\",\"weight\":\"3\",\"img\":\"\"}},\"weight\":\"1\",\"merge\":true},{\"img\":\"\",\"question\":\"\u4f60\u8ba4\u4e3a\u4e00\u6bb5\u611f\u60c5\u91cc\u6700\u4e0d\u80fd\u7f3a\u5c11\u7684\u662f\u4ec0\u4e48\uff1f\",\"audio\":\"\",\"answer\":{\"a\":{\"title\":\"\u966a\u4f34\",\"weight\":\"3\",\"img\":\"\"},\"b\":{\"title\":\"\u6d6a\u6f2b\",\"weight\":\"1\",\"img\":\"\"},\"c\":{\"title\":\"\u7406\u89e3\",\"weight\":\"5\",\"img\":\"\"},\"d\":{\"title\":\"\u5c0a\u91cd\",\"weight\":\"7\",\"img\":\"\"}},\"weight\":\"1\",\"merge\":false},{\"img\":\"\",\"question\":\"\u4f60\u5e73\u65f6\u66f4\u559c\u6b22\u5728\u54ea\u4e2a\u90e8\u4f4d\u6234\u9970\u54c1\uff1f\",\"audio\":\"\",\"answer\":{\"a\":{\"title\":\"\u624b\u8155\",\"weight\":\"1\",\"img\":\"\"},\"b\":{\"title\":\"\u8033\u6735\",\"weight\":\"1\",\"img\":\"\"},\"c\":{\"title\":\"\u8116\u5b50\",\"weight\":\"1\",\"img\":\"\"},\"d\":{\"title\":\"\u4e0d\u592a\u559c\u6b22\u6234\u9970\u54c1\",\"weight\":\"1\",\"img\":\"\"}},\"weight\":\"1\",\"merge\":false},{\"img\":\"\",\"question\":\"\u4f60\u66f4\u559c\u6b22\u5403\u54ea\u79cd\u53e3\u5473\u7684\u98df\u7269\uff1f\",\"audio\":\"\",\"answer\":{\"a\":{\"title\":\"\u9178\u751c\u53e3\u7684\",\"weight\":\"1\",\"img\":\"\"},\"b\":{\"title\":\"\u9ebb\u8fa3\u53e3\u7684\",\"weight\":\"3\",\"img\":\"\"},\"c\":{\"title\":\"\u9178\u8fa3\u53e3\u7684\",\"weight\":\"5\",\"img\":\"\"}},\"weight\":\"1\",\"merge\":false}]","original":"1","type":"2","cid":"1","img":"quce\/1566872594v8gMQ.jpg","tpl_id":"10","is_game":"0","share_url":"","view":"184200","like_num":"0","utime":"1567120201","subscribe":"15","new_plan":"1","status":"1","special_result":"1","need_login":"1","pid":"0"};
    var isQQH5 = false;
    if("" == 302){
        isQQH5 = true;
    }`

var headImgReg = regexp.MustCompile("headimg_config:'([\\s\\S]*?)',")

func main() {
	str1 := "/dad?kljkfds"
	str2 := "/dad#kljkfds"
	fmt.Println(strings.IndexAny(str1, "?#"))
	fmt.Println(strings.IndexAny(str2, "?#"))
	//data, err := container.Game.Get("6911")
	//if err != nil {
	//	panic(err)
	//}
	//fmt.Printf("%+v", data)
	//data, err := ioutil.ReadFile("game_data8.json")
	//if err != nil {
	//	panic(err)
	//}
	//res := &GameData{}
	//err = json.Unmarshal(data, &res)
	//if err != nil {
	//	panic(fmt.Sprintf("%+v\n", err))
	//}
	//data, _ = json.Marshal(res)
	//fmt.Printf("%s\n", string(data))
	//resp, err := http.Get("http://quce.cdn.woquhudong.cn/entry/js/jweixin-1.0.0.js")
	//if err != nil {
	//	panic(err)
	//}
	//defer resp.Body.Close()
	//data, err := ioutil.ReadAll(resp.Body)
	//if err != nil {
	//	panic(err)
	//}
	//fmt.Println(string(data))
}
